using System;
using game_config;

namespace game_stuff
{
    [Serializable]
    public readonly struct PlayBuffFixEffect
    {
        public PlayBuffFixEffect(play_buff_id playBuffId, float fixEffect)
        {
            PlayBuffId = playBuffId;
            FixEffect = fixEffect > 0 ? new[] { fixEffect, 0 } : new[] { 0, -fixEffect };
        }


        public static PlayBuffFixEffect GenByConfig(weapon_unlock weaponUnlock)
        {
            return new PlayBuffFixEffect(weaponUnlock.BuffToFix, weaponUnlock.ValuePerLv);
        }

        public play_buff_id PlayBuffId { get; }

        // public bool ForSelf { get; }

        public float[] FixEffect { get; }
    }
}